package com.itheima.test1110work;
//电器类，父类
public class Elect {
    //公有属性
    private String name;//名称
    private String size;//型号
    private String color;//颜色
    private double price;//价格
    //有参构造
    public Elect(String name, String size, String color, double price) {
        this.name = name;
        this.size = size;
        this.color = color;
        this.price = price;
    }
    //  无参构造
    public Elect() {
    }
    //  生成get，set方法
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSize() {
        return size;
    }

    public void setSize(String size) {
        this.size = size;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }
}
